package org.catspaw.cherubim.matcher;

final class UrlUtils {

	static String truncateParameters(String url) {
		String urlBody = url;
		// Strip anything after a question mark symbol, as per SEC-161.
		int firstQuestionMarkIndex = url.lastIndexOf("?");
		if (firstQuestionMarkIndex != -1) {
			urlBody = url.substring(0, firstQuestionMarkIndex);
		}
		return urlBody;
	}
}
